<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!--<![endif]-->
<head>
<meta charset="utf-8">
<title>肯德鸭</title>
<script language="javascript">
	function checkUserInfo() {
		if (document.loginForm.loginName.value == "") {
			alert("用户名不能为空");
			return false;
		}
		if (document.loginForm.loginPass.value == "") {
			alert("密码不能为空");
			return false;
		}
	}
</script>
<script language="javascript">
	function funsubmit(){
		if(document.loginForm.registPass2.value != document.loginForm.registPass.value)
		{
		alert("用户输入密码不一致");
		return false;
		}
		document.loginForm.action="UserRegister";
		document.loginForm.submit();
	}
	
	function funverify(){
		document.loginForm.action="userVerify";
		document.loginForm.submit();
	}
</script>
<!--js-->
<script src="js/jquery-1.8.2.min.js"></script>
<script src="js/common.js"></script>
<script src="js/jquery.easing.1.3.js"></script>
<script src="js/ddsmoothmenu.js"></script>
<script src="js/jquery.flexslider.js"></script>
<script src="js/jquery.elastislide.js"></script>
<script src="js/jquery.jcarousel.min.js"></script>
<script src="js/jquery.accordion.js"></script>
<script src="js/light_box.js"></script>
<script type="text/javascript">$(document).ready(function(){$(".inline").colorbox({inline:true, width:"50%"});});</script>
<!--end js-->

<!-- Mobile Specific Metas ================================================== -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

<!-- CSS ================================================== -->

<link rel="stylesheet" href="newcss/style.css">
<link rel="stylesheet" href="newcss/orange.css">
<link rel="stylesheet" href="newcss/skeleton.css">
<link rel="stylesheet" href="newcss/layout.css">
<link rel="stylesheet" href="newcss/ddsmoothmenu.css"/>
<link rel="stylesheet" href="newcss/elastislide.css"/>
<link rel="stylesheet" href="newcss/home_flexslider.css"/>

<link rel="stylesheet" href="newcss/light_box.css"/>
<script src="newjs/html5.js"></script>

<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<!--[if lt IE 9]>
			<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
		<![endif]-->

</head>
<body>
	<div class="mainContainer sixteen container">
            <!--Header Block-->
            <div class="header-wrapper">
              <header class="container">
                <div class="head-right">
                  <section class="header-bottom">
                  </section>
                </div>
                <h1 class="logo"><a href="#" title="Logo">
                  <img title="Logo" alt="Logo" src="images/kendeya.jpg" />
                  </a></h1>
                <nav id="smoothmenu1" class="ddsmoothmenu mainMenu">
                  <ul id="nav">
                    <li class="active"><a href="#" title="Home">登录</a></li>
                    <li class=""><a href="registUser.jsp" title="Home">注册</a></li>
                  </ul>
                </nav>
              </header>
            </div>
<!--Content Block-->
<section class="content-wrapper">
	<div class="content-container container">
		<div class="main">
			<h1 class="page-title">登录或注册用户</h1>
			<div class="account-login">
				<div class="col-1 new-users">
					<div class="content">
						<h2>您是新用户</h2>
						<p>通过简单的注册步骤，您就可以肯德鸭的会员，可以浏览本订餐系统中的各种菜品，并进行订餐。</p>
						<div style="text-align: center; width: 316px;">
							<img alt="" src="images/kedaya.jpg" style="margin: 0 auto;" />
						</div>
					</div>
					
					<div class="buttons-set">
						<a class="orange-btn" title="Create an Account" href="registUser.jsp"><span><span>注册</span></span></a>
						<div class="clear"></div>
					</div>
				</div>
				<form method="POST" name="loginForm" onSubmit="return checkUserInfo()" action="phonecallcheck.jsp">
				<div class="col-2 registered-users">
					<div class="content">
						<h2>您是肯德鸭会员</h2>
						<p>如果您是肯德鸭的会员，请输入用户名、密码和一个可以接听电话号码，我们将对您进行语音验证，验证成功后即可登录。如果您是新用户，则需要点击左下角的注册按钮，经过几个的步骤即可完成注册。</p>
						<ul class="form-list">
							<li>
								<label class="required" for="email">用户名<em>*</em></label>
								<div class="input-box">
									<input type="text" name="loginName" class="input-text required-entry validate-email" value="<%=getCookie(request, "myuser")%>" />
								</div>
							</li>
							<li>
								<label class="required" for="pass">密码<em>*</em></label>
								<div class="input-box">
									<input type="password" name="loginPass" class="input-text required-entry validate-password" value="<%=getCookie(request, "mypass")%>"/>
								</div>
								<div class="clear"></div>
							</li>
							<li>
								<label class="required" for="pass">手机号<em>*</em></label>
								<div class="input-box">
									<input type="text" name="phoneNum" class="input-text required-entry validate-email" value=""/>
								</div>
								<div class="clear"></div>
							</li>
							记住密码 ：<input type="checkbox" name="rem" value="yes">
						</ul>
						<p class="required">* 必须填写</p>
					</div>
					<div class="buttons-set">
						<!-- <a class="orange-btn" title="Login"><span><span>Login</span></span></a> -->
						
						<input class="orange-btn" type="submit" name="Submit" value="进行语音验证">
						<input type="hidden" name="actiontype" value="login">
						
						<div class="clear"></div>
					</div>
            	</div>
            	</form>
				<div class="clear"></div>
			</div>
		</div>
		<div class="clearfix"></div>
		<div class="news-letter-container">
			<div class="free-shipping-block">
				<h1>免费送餐</h1>
				<p>肯德鸭宅急送</p>
			</div>
		</div>	
	</div>
</section>
</div>
<!--Footer Block-->
<section class="footer-wrapper">
              <footer class="container">
                <div class="footer-bottom-block">
                  <p class="copyright-block">Copyright &copy; 2018.CUGB all rights reserved.</p>
                </div>
              </footer>
            </section>
            	<%!
		String getCookie(HttpServletRequest request, String name)
	   {
	       Cookie[] cookies = request.getCookies();
	       if (cookies == null)
	       {
	           return "";
	       }
	
	       for (int i = 0; i < cookies.length; i++)
	       {
	           if (cookies[i].getName().equals(name))
	           {
	               return cookies[i].getValue();
	           }
	       }
	       return "";
	   }
	%>
<div style="display:none"><script src='http://v7.cnzz.com/stat.php?id=155540&web_id=155540' language='JavaScript' charset='gb2312'></script></div>
</body>	
</html>